public class print2 {
public static void main(String[] args){
  int i = 4;
  double j = 5.000f;
  System.out.printf("i 的值为：%d%n",i);
  System.out.printf("i 的值为：%d,j的值为：%.1f%n",i,j);
  System.out.printf("i 的值为：%d,j的值为：%.2f%n",i,j);
  System.out.printf("i 的值为：%d,j的值为：%.3f%n",i,j);
  System.out.printf("i 的值为：%d,j的值为：%.4f%n",i,j);
  System.out.printf("i 的值为：%d,j的值为：%.5f%n",i,j);
  System.out.printf("i 的值为：%d,j的值为：%f%n",i,j);
//这是查看printf的控制输出功能～
}
}
  
  
